package com.jt.config;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * mybatis-plus分页插件配置类
 * MP分页操作需要通过MP拦截器才能生效
 * @EnableTransactionManagement 启用事务管理
 * @author dc
 * @Classname MPConfig
 * @Date 2020/2/7 15:26
 */
@Configuration
//@EnableTransactionManagement
public class MPConfig {
    @Bean
    public PaginationInterceptor paginationInterceptor() {
        return new PaginationInterceptor();
    }
}
